AC_PREREQ(2.6)
# Process this file with autoconf to produce a configure script.
AC_INIT(clicksniffer,0.9,yangl@iastate.edu)

AM_INIT_AUTOMAKE

AC_CONFIG_SRCDIR(clicksniffer.cc) 

AC_PROG_CC
AC_PROG_CXX

AC_CONFIG_HEADERS(config.h)

AC_CONFIG_FILES(Makefile)

CFLAGS="-g -Wall -O"

AC_HEADER_STDBOOL

AC_CHECK_FUNCS([memset],[],[AC_MSG_ERROR(Can't find memset)])
AC_CHECK_FUNCS([strstr],[],[AC_MSG_ERROR(Can't find strstr)])
AC_CHECK_FUNCS([inet_ntoa],[],[AC_MSG_ERROR(Can't find inet_ntoa)])

AC_CHECK_HEADERS([pcap.h],[],[AC_MSG_ERROR(Can't find pcap.h)])
AC_CHECK_HEADERS([arpa/inet.h],[],[AC_MSG_ERROR(Can't find inet.h)])
AC_CHECK_HEADERS([netinet/in.h],[],[AC_MSG_ERROR(Can't find netinet.h)])
AC_CHECK_HEADERS([sys/socket.h],[],[AC_MSG_ERROR(Can't find socket.h)]) 

AC_C_CONST
AC_STRUCT_TM 


AC_OUTPUT